<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	
	<xsl:template match="*"></xsl:template>
	
	<xsl:template match="content">
		<h2>Все коллекции</h2>
		<xsl:apply-templates select="collections" mode="html" />
		
		<h2>Случайные экспонаты</h2>
		<xsl:apply-templates select="random"  mode="html" />
	</xsl:template>


	<xsl:template match="collections" mode="html">
		<xsl:apply-templates select="collection" mode="html"/>
	</xsl:template>

	<xsl:template match="collection" mode="html">
		<h3><xsl:value-of select="@title" /></h3>
		<a href="/collection/{@name}">Посмотреть все</a>
		<p><xsl:apply-templates select="object" mode="html"/></p>
		<br clear="both"/>
	</xsl:template>


	<xsl:template match="object" mode="html">
		<div style="float: left; margin: 1em">
			<div><a href="/show/{@uid}">экспонат № <xsl:value-of select="@uid" /></a></div>
			<!-- <a href="/show/{@uid}"><img src="/images/{oCard/@table}/{oCard/oImage/object/oFile/name/text()}" height="100" width="150" /></a> -->
		</div>
	</xsl:template>


	<xsl:template match="random" mode="html">
		<p><xsl:apply-templates select="object" mode="html"/></p>
		<br clear="both"/>
	</xsl:template>



</xsl:stylesheet>